-
Notifications
You must be signed in to change notification settings - Fork 183
Added Skill Check Dialog Using New Centralized Skill Check Utility #6578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Implemented new skill check feature, including UI updates and backend logic. - Refactored `SkillType`, `SkillCheckUtility` `MarginOfSuccess` enums to remove a handful of bugs or to add new functionality.
… failure images based on skill check results.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6578 +/- ##
============================================
- Coverage 11.43% 11.42% -0.01%
- Complexity 6451 6456 +5
============================================
Files 1086 1087 +1
Lines 139459 139560 +101
Branches 21571 21584 +13
============================================
+ Hits 15948 15950 +2
- Misses 121914 122015 +101
+ Partials 1597 1595 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…flect the change in current edge.
package mekhq.gui.dialog; | ||
|
||
import static megamek.common.Compute.randomInt; | ||
import static mekhq.campaign.personnel.skills.SkillCheckUtility.determineTargetNumber; | ||
import static mekhq.utilities.MHQInternationalization.getFormattedTextAt; | ||
|
||
import java.awt.GridBagConstraints; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copyright header.
…e beginning of the SkillCheckDialog.java file.
Dev Notes
As mentioned in the title, this PR adds the ability for players to trigger Skill Checks at will. This is done by right-clicking on the character (or characters) and selecting 'Perform Skill Check', at which point the player is presented with a dialog where they can choose the skill and modifiers. They can also choose whether to use Edge, in the event of a failure.
Once the check has been set up the player is then presented with a second dialog showing the results of the check.
This functionality all uses our new centralized Skill Check utility class, ensuring that SPAs, traits, and attribute scores are all correctly factored into the target number.
Placeholder Art
This PR uses placeholder AI Generated art assets. A human artist has already been commissioned and expects to have the pieces ready by the launch of 50.05. Three pieces have been commissioned, the first is for the page where the user selects skill. Then there are two follow-up pieces one for when the check passes, another for when the check fails.
Ulterior Motives
Really I just wanted to test the new centralized Skill Check class and fix any bugs. That we get a fancy new dialog out of it is just a cherry on top of an unintentional cake.